package com.dd.cloud.user.mapper.doctor;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dd.cloud.user.entity.doctor.DoctorStudyRecord;
import com.dd.cloud.user.req.doctor.DoctorStudyReq;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;

/**
 * <p>
 * 医生学习记录表 Mapper 接口
 * </p>
 *
 * @author czg
 * @since 2024-02-21
 */
public interface DoctorStudyRecordMapper extends BaseMapper<DoctorStudyRecord> {

    /**
     * 查询记录
     * @param type
     * @param id
     * @param now
     * @return
     */
    DoctorStudyRecord queryDoctorStudentRecord(@Param("doctorId") Integer doctorId,
                                               @Param("type") Integer type,
                                               @Param("now") LocalDate now,
                                               @Param("studyId") Integer studyId);

    /**
     * 分页查询学习记录
     * @param page
     * @param req
     * @return
     */
    Page<DoctorStudyRecord> queryDoctorStudyPage(@Param("page") Page<DoctorStudyRecord> page,
                                                 @Param("req") DoctorStudyReq req);
}
